﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ElCharro01.Models;


namespace ElCharro01.Controllers
{
    public class HomeController : Controller
    {
        private Entities db = new Entities();


        public ActionResult Index()
        {

            Session["clothingTypeId"] = 0;
            Session["categoryId"] = 0;
            if (Session["cartId"] == null)
            Session["cartId"] = 0;
            if ( Session["UserId"] == null)
            Session["UserId"] = 0;
            Session.Timeout = 60;


            return View(db.ProductSet.Where(p => p.InSlideShow).OrderBy(p => p.Nome).ToList());
        }

        public ActionResult InitializedIndex()
        {

            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return View();
        }



        public ActionResult About()
        {
            return View();
        }


    }
}
